package com.itheima.test;

import com.itheima.util.BallUtil;
import com.itheima.util.BallUtil2;

import javax.print.DocFlavor;
import java.io.Serializable;
import java.util.*;

/*
生成双色球
 */
public class Demo03 {


    public static void main(String[] args) {
       /* TreeSet<Integer[]> set = new TreeSet<>((arr1, arr2) -> {
            if(arr1==null||arr2==null)return 0;
            int i1 = arr1[0] - arr2[0];
            int i2 = i1 == 0 ? arr1[1] - arr2[1] : i1;
            int i3 = i2 == 0 ? arr1[2] - arr2[2] : i2;
            int i4 = i3 == 0 ? arr1[3] - arr2[3] : i3;
            int i5 = i4 == 0 ? arr1[4] - arr2[4] : i4;
            int i6 = i5 == 0 ? arr1[5] - arr2[5] : i5;
            int i7 = i6 == 0 ? arr1[6] - arr2[6] : i6;
            return i7;
        });*/
        long start = System.currentTimeMillis();
        ArrayList<Vector<Integer>> list = new ArrayList<>();
        while (list.size()<=5000){
            Vector<Integer> allBall = BallUtil2.getAllBall();
            list.add(allBall);
        }
        long end = System.currentTimeMillis();
        System.out.println(end-start);
        for (Vector<Integer> balls : list) {
            System.out.println(balls);
        }


    }
}
